home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1998 September / EnigmA AMIGA RUN 30 (1998)(G.R. Edizioni)(IT)[!][issue 1998-09].iso / recent / nc-11u1.lha / nc-1.1 / data / rip.d < prev    next >
Text File  |  1998-07-15  |  1KB  |  53 lines

  1. # struct netinfo {
  2. #    struct    sockaddr rip_dst;    /* destination net/host */
  3. #    int    rip_metric;        /* cost of route */
  4. # };
  5. # struct rip {
  6. #    u_char    rip_cmd;        /* request/response */
  7. #    u_char    rip_vers;        /* protocol version # */
  8. #    u_char    rip_res1[2];        /* pad to 32-bit boundary */
  9. #    union {
  10. #        struct    netinfo ru_nets[1];    /* variable length... */
  11. #        char    ru_tracefile[1];    /* ditto ... */
  12. #    } ripun;
  13. #define    rip_nets    ripun.ru_nets
  14. #define    rip_tracefile    ripun.ru_tracefile
  15. #define    RIPCMD_REQUEST        1    /* want info */
  16. #define    RIPCMD_RESPONSE        2    /* responding to request */
  17. #define    RIPCMD_TRACEON        3    /* turn tracing on */
  18. #define    RIPCMD_TRACEOFF        4    /* turn it off */
  19. #define    HOPCNT_INFINITY        16    /* per Xerox NS */
  20. #define    MAXPACKETSIZE        512    /* max broadcast size */
  21.  
  22. ### RIP packet redux
  23. ### UDP send FROM clued-rtr/520 to target/520
  24. 2    # RIPCMD_RESPONSE
  25. 1    # version
  26. 0    # padding
  27. 0
  28.  
  29. # sockaddr-plus-metric  structs begin, as many as necessary...
  30. 0    # len
  31. 2    # AF_INET
  32. 0    # port
  33. 0
  34. # addr bytes:
  35. X
  36. Y
  37. Z
  38. Q
  39. 0    # filler, out to 16 bytes [sizeof (sockaddr)] ...
  40. 0
  41. 0
  42. 0
  43. 0
  44. 0
  45. 0
  46. 0
  47. 0    # metric: net-order integer
  48. 0
  49. 0
  50. 1
  51.  
  52. ## that's it
  53.